home *** CD-ROM | disk | FTP | other *** search
- /*
- PAR CREATE IFF FROM STILLS
- By J.L. White
- ©1994 Merlin's Software
-
- Takes PAR Stills & Converts Them To IFF24 Images
- Personal Animation Recorder Script
- Requires The Rexxarplib.library
-
- Batch Factory Batch Conversion Scripts are basically Arexx scripts that
- allow you to pass certain parameters to the external program you wish
- to use to convert the images from one format to another. You can pass
- five different strings from Batch Factory to the script by using the
- following commands:
-
- $N = This will pass the current selected filename.
- $P = This will tell Batch Factory to ask for a path to save new frames to.
- $# = This will pass the current frame number in the script.
- $T = This will pass the total number of frames in the script.
- $A = This will pass an offset number to be used to save frames with.
-
- NOTE: The following line is required to work as a Batch Factory Script:
-
- PARSE=$N $# $T
-
- */
-
- arg InFile FileNum TotalNum
- options results
- if ~show('l', "rexxarplib.library") then do
- check = addlib('rexxsupport.library',0,-30,0)
- check = addlib('rexxarplib.library',0,-30,0)
- end
- PName = "Batch"
-
-
- Top = 170
- Height = ScreenRows(PName)
- if Height < 400 then Top = 70
- call Locate_PAR
-
- if FileNum = 1 then do
- result = GetFile(165,11,"RAM:","","Select Path To Copy Files To!","Batch",NOFILES,,,Height-35)
- address "DDR"
- Path result
- Emode Frame
- Exporter IFF
- PathName = GetPathName(InFile)
- ProjectName = GetProjectName(PathName)
- NameLength = Length(ProjectName)
- ProjectName = left(ProjectName,NameLength-1)
- Project ProjectName
- end
- address "DDR"
- FrameName = GetFileName(InFile)
- File FrameName
- Export
- exit
-
- Locate_PAR:
- if (POS('DDR',SHOW('Ports')) = 0)
- then do
- call Request(180,Top-14,"Can Not Locate The PAR Software\Please Abort Script & Try Again!",,"OK",,PName)
- address command "Wait 3"
- exit
- end
- return
-
-
-
- GetFileName: procedure
- ARG CompleteName
- c = lastpos("/",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return substr(CompleteName, c + 1)
-
- GetPathName: procedure
- ARG CompleteName
- c = lastpos("/",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return left(CompleteName,c)
-
- GetProjectName: procedure
- ARG CompleteName
- c = lastpos(":",CompleteName)
- return substr(CompleteName,c+1)
-
-